(1) Field of the Invention
The present invention relates to an image decoding apparatus and method of decoding coded image data using motion compensation.
(2) Description of the Related Art
With the advancement of digitalization for image data in recent years, recording and transmitting moving image data that includes a large amount of data is commonly carried out after reducing the amount of data using image coding.
Image coding systems with high efficiency such as MPEG2 and MPEG4 AVC/H.264 (hereinafter abbreviated as the H.264) are often employed for the above purpose.
With these coding systems, coding is carried out for each rectangular unit (formed typically of 16 horizontal pixels and 16 vertical pixels) which is called a macroblock.
When coding a macroblock, a pattern similar to a pattern of the macroblock is searched for, in other fields or frames in which coding has been carried out, and taken out, and a difference value from a pixel value of the macroblock is coded, so that the compression efficiency is increased.
The above processing is called motion compensation, and when performing image coding, vector information indicating the position of a pixel value that has been taken out is simultaneously coded as a motion vector.
The following describes, with reference to FIG. 7, a configuration example of an image decoding apparatus that decodes coded data by using motion compensation.
FIG. 7 is a block diagram which shows an example of the configuration of a conventional image decoding apparatus.
A conventional image decoding apparatus 400 as shown in FIG. 7 includes: an input unit 401; a variable length decoding unit 403; a pixel value decoding unit 404; a motion vector detecting unit 405; a motion compensation unit 406; an output unit 407; and a memory 408.
The variable length decoding unit 403 performs variable length decoding, on a macroblock-by-macroblock basis, on image coded data that has been inputted by the input unit 401. The motion vector detecting unit 405 extracts, from among data on which variable length decoding has been performed, the motion vector corresponding to the macroblock. The motion compensation unit 406 reads a pixel value necessary for the motion compensation from decoded pixel data stored in the memory 408 and generates a motion compensation pixel.
Further, the pixel value decoding unit 404 generates motion compensation difference data corresponding to the macroblock by using the data decoded by the variable length decoding unit 403. The pixel value decoding unit 404 further generates decoded pixel data by adding the motion compensation difference data and a motion compensation value obtained from the motion compensation unit 406.
The decoded pixel data is temporarily stored in the memory 408, and then outputted from the output unit 407 according to a reproduction timing of TV and the like. In addition, the decoded pixel data stored in the memory 408 is used also for motion compensation performed on another macroblocks.
Here, the configuration of the image decoding apparatus 400 shown in FIG. 7 allows imaged coded data to be decoded into moving image data. In addition, in the above-described motion compensation, a pixel at an arbitrary position in a picture that has been decoded can be referred to for each macroblock or each block in a divided macroblock.
Thus, it is necessary, in order to perform motion compensation, to read from the memory 408 a pixel value at a random position for each macroblock.
Since image data obtained thorough image decoding has, in general, a significantly large amount of data, the memory 408 described above is configured of an external dynamic random access memory (DRAM). Further, in the case where data is read randomly in a small rectangular unit such as a macroblock, a significant overhead occurs. Thus, it is difficult to read data from the DRAM at high speed.
Thus, a large number of costly high-speed DRAMs need to be used in parallel for decoding large volumes of a high-speed moving image such as a high-definition image. This leads to a great amount of circuitry cost and power consumption.
Patent Literature 1 (U.S. Pat. No. 6,735,340) discloses a technique related to an image decoding apparatus that improves such problems. To be specific, the Patent Literature 1 discloses a technique for reducing a memory access to an external DRAM in decoding data on which the H.264 coding has been performed.
Here, the H.264 employs a technique of intra frame prediction in addition to the motion compensation so as to reduce image information. The intra frame prediction is a technique with which, when coding a macroblock, an interpolation pixel is generated by using a pixel value of a coded macroblock adjoining the macroblock to be coded, to code a difference value between a pixel value of the macroblock to be coded and a pixel value of the interpolation pixel.
According to the image decoding apparatus described in the Patent Literature 1, when decoding image coded data by using the intra frame prediction, a pixel value of a decoded macroblock adjoining a macroblock to be decoded is stored in a cache memory.
This enables decoding by using the data stored in the cache memory without directly reading data from an external DRAM when generating an interpolation pixel for intra frame prediction for each macroblock.